home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / util / misc / VMM_src.lha / VMM / MUI / cat / VMM_Cat.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-16  |  7.7 KB  |  179 lines

  1. /****************************************************************
  2.    This file was created automatically by `FlexCat 1.5'
  3.    from "cat/VMM.cd".
  4.  
  5.    Do NOT edit by hand!
  6. ****************************************************************/
  7.  
  8. #include <libraries/locale.h>
  9. #include <clib/locale_protos.h>
  10.  
  11.  
  12.  
  13.  
  14. static LONG VMM_Version = 3;
  15. static const STRPTR VMM_BuiltInLanguage = (STRPTR) "english";
  16.  
  17. struct FC_Type
  18. {   LONG   ID;
  19.     STRPTR Str;
  20. };
  21.  
  22.  
  23. const struct FC_Type _msgDontUseVM = { 0, "Don't use VM" };
  24. const struct FC_Type _msgUseVM = { 1, "Use VM" };
  25. const struct FC_Type _msgAdvancedOptions = { 2, "Advanced options" };
  26. const struct FC_Type _msgAddProg = { 3, "Add Program" };
  27. const struct FC_Type _msgAddProgShort = { 4, "p" };
  28. const struct FC_Type _msgAddTask = { 5, "Add Task" };
  29. const struct FC_Type _msgAddTaskShort = { 6, "t" };
  30. const struct FC_Type _msgAdd = { 7, "Add" };
  31. const struct FC_Type _msgAddShort = { 8, "a" };
  32. const struct FC_Type _msgTop = { 9, "Top" };
  33. const struct FC_Type _msgTopShort = { 10, "t" };
  34. const struct FC_Type _msgUp = { 11, "Up" };
  35. const struct FC_Type _msgUpShort = { 12, "u" };
  36. const struct FC_Type _msgDown = { 13, "Down" };
  37. const struct FC_Type _msgDownShort = { 14, "w" };
  38. const struct FC_Type _msgBottom = { 15, "Bottom" };
  39. const struct FC_Type _msgBottomShort = { 16, "b" };
  40. const struct FC_Type _msgDelete = { 17, "Delete" };
  41. const struct FC_Type _msgDeleteShort = { 18, "d" };
  42. const struct FC_Type _msgSort = { 19, "Sort" };
  43. const struct FC_Type _msgSortShort = { 20, "o" };
  44. const struct FC_Type _msgCode = { 21, "Code" };
  45. const struct FC_Type _msgData = { 22, "Data" };
  46. const struct FC_Type _msgMinPublic = { 23, "Min. PUBLIC alloc." };
  47. const struct FC_Type _msgMinNonPublic = { 24, "Min. non-PUBLIC alloc." };
  48. const struct FC_Type _msgSelectTask = { 25, "Select Task" };
  49. const struct FC_Type _msgFixedSize = { 26, "Fixed size" };
  50. const struct FC_Type _msgDynamic = { 27, "Dynamic" };
  51. const struct FC_Type _msgRestrictedDynamic = { 28, "Restricted dynamic" };
  52. const struct FC_Type _msgDevice = { 29, "Partition" };
  53. const struct FC_Type _msgFile = { 30, "File" };
  54. const struct FC_Type _msgPseudoPart = { 31, "Pseudo-partition" };
  55. const struct FC_Type _msgAny = { 32, "ANY" };
  56. const struct FC_Type _msgChip = { 33, "CHIP" };
  57. const struct FC_Type _msgFast = { 34, "FAST" };
  58. const struct FC_Type _msgSelectFile = { 35, "Please select file" };
  59. const struct FC_Type _msgPagingMemory = { 36, "\033cPaging memory" };
  60. const struct FC_Type _msgMemType = { 37, "\033cMemory type" };
  61. const struct FC_Type _msgMinMem = { 38, "\033cMinimum memory" };
  62. const struct FC_Type _msgMaxMem = { 39, "\033cMaximum memory" };
  63. const struct FC_Type _msgWriteBuffer = { 40, "\033cWrite buffer" };
  64. const struct FC_Type _msgPrio = { 41, "\033cVM Priority" };
  65. const struct FC_Type _msgFileSize = { 42, "\033cFile size" };
  66. const struct FC_Type _msgZoomed = { 43, "Titlebar only" };
  67. const struct FC_Type _msgPosUnzoomed = { 44, "\033cPosition in normal state" };
  68. const struct FC_Type _msgLeftEdge = { 45, "Left" };
  69. const struct FC_Type _msgTopEdge = { 46, "Top" };
  70. const struct FC_Type _msgPosZoomed = { 47, "\033cPosition as titlebar" };
  71. const struct FC_Type _msgStatistics = { 48, "Statistics" };
  72. const struct FC_Type _msgCacheZ2RAM = { 49, "Cache Zorro II RAM" };
  73. const struct FC_Type _msgPatchWB = { 50, "Show VM in WB title" };
  74. const struct FC_Type _msgMemTracking = { 51, "Memory tracking" };
  75. const struct FC_Type _msgMinVMAlloc = { 52, "Min. VM allocation" };
  76. const struct FC_Type _msgEnableHotkey = { 53, "Enable VM hotkey" };
  77. const struct FC_Type _msgDisableHotkey = { 54, "Disable VM hotkey" };
  78. const struct FC_Type _msgProject = { 55, "Project" };
  79. const struct FC_Type _msgOpen = { 56, "Open..." };
  80. const struct FC_Type _msgOpenShort = { 57, "O" };
  81. const struct FC_Type _msgSaveAs = { 58, "Save As..." };
  82. const struct FC_Type _msgSaveAsShort = { 59, "A" };
  83. const struct FC_Type _msgSaveWindow = { 60, "Save Window" };
  84. const struct FC_Type _msgAbout = { 61, "About..." };
  85. const struct FC_Type _msgHide = { 62, "Hide" };
  86. const struct FC_Type _msgHideShort = { 63, "H" };
  87. const struct FC_Type _msgQuit = { 64, "Quit" };
  88. const struct FC_Type _msgQuitShort = { 65, "Q" };
  89. const struct FC_Type _msgEdit = { 66, "Edit" };
  90. const struct FC_Type _msgDefaults = { 67, "Reset To Defaults" };
  91. const struct FC_Type _msgDefaultsShort = { 68, "D" };
  92. const struct FC_Type _msgLastSaved = { 69, "Last Saved" };
  93. const struct FC_Type _msgLastSavedShort = { 70, "L" };
  94. const struct FC_Type _msgRestore = { 71, "Restore" };
  95. const struct FC_Type _msgRestoreShort = { 72, "R" };
  96. const struct FC_Type _msgSave = { 73, "Save" };
  97. const struct FC_Type _msgSaveShort = { 74, "s" };
  98. const struct FC_Type _msgUse = { 75, "Use" };
  99. const struct FC_Type _msgUseShort = { 76, "u" };
  100. const struct FC_Type _msgCancel = { 77, "Cancel" };
  101. const struct FC_Type _msgCancelShort = { 78, "c" };
  102. const struct FC_Type _msgNameMissing = { 79, "Name of partition of pagefile is missing" };
  103. const struct FC_Type _msgVMMDescr = { 80, "Virtual memory manager" };
  104. const struct FC_Type _msgCopyright = { 81, "Copyright 1993-95 by Martin Apel" };
  105. const struct FC_Type _msgStartVMMError = { 82, "Couldn't start VMM\n" };
  106. const struct FC_Type _msgOutOfMem = { 83, "Not enough memory\n" };
  107. const struct FC_Type _msgNew = { 84, ">> NEW <<" };
  108. const struct FC_Type _msgDefault = { 85, "----- D E F A U L T -----" };
  109. const struct FC_Type _msgLoadPrefs = { 86, "Load VMM Preferences" };
  110. const struct FC_Type _msgSavePrefs = { 87, "Save VMM Preferences" };
  111. const struct FC_Type _msgInvalidPrefs = { 88, "%s is not a valid preferences file\n"\
  112.     "Resetting to defaults" };
  113. const struct FC_Type _msgAboutString = { 89, "\033c\033bVMM V3.3\033n\n"\
  114.     "\033cVirtual memory for Amigas\n"\
  115.     "\033cwith MMU\n\n"\
  116.     "\033cCopyright 1993-95 by Martin Apel" };
  117. const struct FC_Type _msgTasksProgs = { 90, "Tasks/Programs" };
  118. const struct FC_Type _msgMemory = { 91, "Memory" };
  119. const struct FC_Type _msgMisc = { 92, "Miscellaneous" };
  120. const struct FC_Type _msgSelectProg = { 93, "Select program file" };
  121. const struct FC_Type _msgUseCodeShort = { 94, "Y" };
  122. const struct FC_Type _msgNoUseCodeShort = { 95, "N" };
  123. const struct FC_Type _msgUseDataShort = { 96, "Y" };
  124. const struct FC_Type _msgNoUseDataShort = { 97, "N" };
  125. const struct FC_Type _msgAdvancedDataShort = { 98, "A" };
  126. const struct FC_Type _msgSaveWinError = { 99, "Error saving window position" };
  127. const struct FC_Type _msgNoCfgFile = { 100, "Couldn't open config file %s" };
  128. const struct FC_Type _msgCorruptCfgFile = { 101, "File %s is not a valid config file" };
  129. const struct FC_Type _msgFastROM = { 102, "FastROM" };
  130. const struct FC_Type _msgAddDir = { 103, "Add Dir" };
  131. const struct FC_Type _msgAddDirShort = { 104, "i" };
  132. const struct FC_Type _msgSelectDir = { 105, "Select directory" };
  133.  
  134. extern struct Library *LocaleBase;
  135.  
  136. static struct Catalog *VMM_Catalog = NULL;
  137.  
  138. void OpenVMMCatalog(struct Locale *loc, STRPTR language)
  139. { LONG tag, tagarg;
  140.   extern struct Library *LocaleBase;
  141.   extern void CloseVMMCatalog(void);
  142.  
  143.   CloseVMMCatalog(); /* Not needed if the programmer pairs OpenVMMCatalog
  144.                and CloseVMMCatalog right, but does no harm.  */
  145.  
  146.   if (LocaleBase != NULL  &&  VMM_Catalog == NULL)
  147.   { if (language == NULL)
  148.     { tag = TAG_IGNORE;
  149.     }
  150.     else
  151.     { tag = OC_Language;
  152.       tagarg = (LONG) language;
  153.     }
  154.     VMM_Catalog = OpenCatalog(loc, (STRPTR) "VMM.catalog",
  155.                 OC_BuiltInLanguage, VMM_BuiltInLanguage,
  156.                 tag, tagarg,
  157.                 OC_Version, VMM_Version,
  158.                 TAG_DONE);
  159.   }
  160. }
  161.  
  162. void CloseVMMCatalog(void)
  163. { if (LocaleBase != NULL)
  164.   { CloseCatalog(VMM_Catalog);
  165.   }
  166.   VMM_Catalog = NULL;
  167. }
  168.  
  169. STRPTR GetVMMString(APTR fcstr)
  170. { STRPTR defaultstr;
  171.   LONG strnum;
  172.  
  173.   strnum = ((struct FC_Type *) fcstr)->ID;
  174.   defaultstr = ((struct FC_Type *) fcstr)->Str;
  175.  
  176.   return(VMM_Catalog ? GetCatalogStr(VMM_Catalog, strnum, defaultstr) :
  177.               defaultstr);
  178. }
  179.